<?python
    from turbogears import identity
    from mnemoply import model
?>
<span xmlns:py="http://genshi.edgewall.org/">
    <table>
        <thead>
            <tr>
                <th>Name</th>
                <th>Ordinal</th>
                <th>Actions</th>
            </tr>
        </thead>

        <tbody>
            <tr py:for="d in model.CashRegisterDepartment.selectBy(cashRegister=obj)">
                <td><a href="/CashRegisterDepartment/${d.id}">${d.title}</a></td>
                <td>${d.ordinal}</td>
                <td>
                    <span py:if="identity.has_any_permission('dba', 'CashRegisterDepartment/edit')">
                        <a href="delete_department?department_id=${d.id}">delete</a>
                    </span>
                </td>
            </tr>
        </tbody>
    </table>

    <hr />

    <span py:if="identity.has_any_permission('dba', 'CashRegisterDepartment/edit')">${ET(tab.add_form())}</span>
</span>
